﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace yule.Web
{
    /// <summary>
    /// 方法容器
    /// </summary>
    public class ActionContext
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="requestContext"></param>
        public ActionContext(System.Web.Routing.RequestContext requestContext)
        {
            this._ActionName = requestContext.RouteData.Values["action"].ToString();
            this._ControllerName = requestContext.RouteData.Values["controller"].ToString();
        }

        private string _ActionName = null;
        /// <summary>
        /// 方法名
        /// </summary>
        public string ActionName
        {
            get
            {
                return this._ActionName;
            }
        }


        private string _ControllerName = null;
        /// <summary>
        /// 控制器名
        /// </summary>
        public string ControllerName
        {
            get
            {
                return this._ControllerName;
            }
        }

    }
}
